import request from '@/utils/request'

// 查询房源列表
export function listAvailability(query) {
  return request({
    url: '/room/availability/list',
    method: 'get',
    params: query
  })
}

// 查询房源详细
export function getAvailability(id) {
  return request({
    url: '/room/availability/' + id,
    method: 'get'
  })
}

// 新增房源
export function addAvailability(data) {
  return request({
    url: '/room/availability',
    method: 'post',
    data: data
  })
}

// 修改房源
export function updateAvailability(data) {
  return request({
    url: '/room/availability',
    method: 'put',
    data: data
  })
}

// 删除房源
export function delAvailability(id) {
  return request({
    url: '/room/availability/' + id,
    method: 'delete'
  })
}
